import storage from '@system.storage';
export default {
  data: {
    abc: 'abc',
    tabs: [
      {
        title: '食谱',
        icon: '/common/images/cookbook.png',
        activeIcon: '/common/images/cookbook-active.png',/*点击后图标变化*/
      },
      {
        title: '分类',
        icon: '/common/images/menu.png',
        activeIcon: '/common/images/menu-active.png',
      },
      {
        title: '更多',
        icon: '/common/images/more.png',
        activeIcon: '/common/images/more-active.png',
      },
      {
        title: '周边推荐',
        icon: '/common/images/location.png',
        activeIcon: '/common/images/location-active.png',
      },
      {
        title: '个人中心',
        icon: '/common/images/person.png',
        activeIcon: '/common/images/person2.png',
      },


    ],

    currentIndex: 0,

    checked: true
  },

  onReady() {
    storage.get({
      key: 'checked',
      success(data) {
        this.checked = data
      }
    })
  },

  change: function(e) {
    this.currentIndex = e.index
  },

  handleScrollable({detail}) {
    this.checked = detail.checked
  }
}